<?php
namespace app\yunda\model;

use think\Model;
use traits\model\SoftDelete;

/**
 * 支付记录表
 * @package app\yunda\model
 */
class Money_record extends Model
{
    use SoftDelete;
    protected $table = 'dp_yd_money_record';
    protected $autoWriteTimestamp = true;

    //写入记录表
    public static function write($data=[])
    {
//        if(!isset($data['openid'])||!isset($data['pay_money'])||!isset($data['pay_sn'])||!isset($data['pay_order_id']))
//            return '传入参数错误';
        $res=self::create([
            'openid'=>$data['openid'],
            'describe'=>$data['describe'],
            'pay_money'=>$data['pay_money'],
            'pay_sn'=>$data['pay_sn'],
            'pay_order_id'=>$data['pay_order_id'],
        ]);
        return $res;
    }
    
}
